package cn.csq.design.creatation.factory.abstractfactory;

/**
 * @author csq
 * @version 1.0.0
 * @ClassName MainTest.java
 * @Description TODO
 * @createTime 2022年01月03日 18:33:00
 */
public class MainTest {
    public static void main(String[] args) {

        //抽象出来
        //可以抽象成接口（只有方法） 抽象类 属性
        WulinFactory wulinFactory = new WulinWuHanMaskFactory();

        AbstractMask abstractMask = wulinFactory.newMask();
        abstractMask.protectedMe();


        wulinFactory = new WulinVanCarFactory();

        AbstractCar abstractCar = wulinFactory.newCar();
        abstractCar.run();

        WulinFactory wulinFactory2 = new WulinVanCarFactory();

        AbstractCar abstractCar1 = wulinFactory2.newCar();
        abstractCar1.run();

    }
}
